import axios from 'axios'

axios.defaults.timeout = 30000
axios.defaults.headers.post['Accept'] = 'application/json'
axios.defaults.baseURL = 'http://api.tqcaifu.com'

   export default {
        //查询文章
        asyncGetCategoryPost(params){
           return axios.post('/api/post/getCategoryPost', params)
        },
        //查询产品
        asyncgetProduct(params){
            return axios.post('/api/product/getCategoryProduct', params)
        },
        //tag文章
        asyncgetTagPost(params){
            return axios.post('/api/post/getTagPost', params)
        },
        //获取资讯详情
        asyncgetPostDetail(params){
            return axios.post('/api/post/getPostDetail', params)
        },
        //获取产品详情
        asyncgetProductDetail(params){
            return axios.post('/api/product/getProductDetail', params)
        },
        //根据bannertype查询文章
        asyncgetBannerTypePost(params){
            return axios.post('/api/post/getBannerTypePost', params)
        },
        //保险列表
        getInsuranceList(params){
            return axios.post('/api/insurance/getInsuranceList', params)
        },
        //房产列表
        getHouseList(params){
            return axios.post('/api/house/getHouseList', params)
        },
        //保险详情
        getInsuranceDetail(params){
            return axios.post('/api/insurance/getInsuranceDetail', params)
        },
        //房产详情
        getHouseDetail(params){
            return axios.post('/api/house/getHouseDetail', params)
        },
         //文章评论列表
         getNewsLists(params){
            return axios.post('/api/postreview/lists', params)
        },
        //增加评论
        addNewsList(params){
            return axios.post('/api/postreview/add', params)
        }
   }
